home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 386 / assemblr / assemble.asc < prev   
Text File  |  1993-01-01  |  13KB  |  315 lines

  1. *****************************************************************
  2. This assembler is Public Domain from West Germany and is free to 
  3. be copied and shared as long as it is not sold and this 
  4. documentation remains with it.  The author is:
  5.  
  6.                           Eckhard Kruse
  7.                          Reichenbergweg 7
  8.                            3302 Weddel
  9.                            West Germany
  10.  
  11. The program was imported translated from the original german by:
  12.  
  13.                          Robert Zimmerer
  14.                           131 W 2nd St.
  15.                      Port Angeles, WA.  98362
  16.                           (206) 452-7529 
  17. For more information about this and other software available from 
  18. germany, write or call me.                          *See adendum
  19. *****************************************************************
  20.  
  21.  
  22.                   Description of this Assembler
  23.         (2 pass assembler, disassembler, editor, debugger)
  24.  
  25. General overview
  26.  
  27. 1.   This assembler allows the construction of machine language 
  28. programs with the use of the general 68000 command set.  It is 
  29. line oriented and can process data that is prepared with a 
  30. different editor.  It was designed for simple operation during 
  31. programming.  The assembler remains in memory along with the 
  32. program being written and can be immediately called up or tested.
  33.  
  34. 2.   The assembler was written for medium and high resolutions.  
  35. If it is used in low resolution, undesirable effects may occur. 
  36. (especially during editing)
  37.  
  38. 3.   The maximum program size is 30000 lines; providing that you 
  39. have reserved enough space for the listing, labels and the 
  40. assembled program.  Immediately after loading, the free memory 
  41. space is shown and you may allocate space for the three areas 
  42. according to your needs.  As a rule you may ignore this 
  43. installation proceedure and use the default settings by pressing 
  44. <Return>.  Keep in mind, though, ther is no error message given if 
  45. you should run out of space. (this can cause loss of data)
  46.  
  47. 4.   The assembler distinguishes between UPPER and lower case text 
  48. only btween quotation marks.  On the other hand this is the case 
  49. when you define strings with: DC, or when you want to list from a 
  50. label using: LIST "LABEL".
  51.  
  52.  
  53.                          Direct commands
  54.  
  55.      After loading the assembler and allocating the memory, you 
  56. are in Direct Mode.  You now have a list of commands at your 
  57. disposal which are sorted and explained by function:
  58.  
  59. Commands for handling the program listing:
  60.  
  61. ADD  - Append lines to the end of the program; if no program is in 
  62.      memory, a new one is created.
  63.  
  64. E, EDIT [Ln#, Ln#] - Edit or change lines.  Allows parameters for 
  65.      beginning and ending line # to edit [not necessary]. If you 
  66.      enter a string or label in quotation marks, editing will 
  67.      begin at the line which starts with this string.
  68.  
  69. INS [Ln#] - Insert a line before the given line #.
  70.  
  71. DEL [LN#, Ln#] - Delete or erase lines.  The parameters for this 
  72.      command operate like EDIT.
  73.  
  74. COPY Ln#, Ln# TO Ln# - Copies the lines specified before TO 
  75.      inserting them directly above the line # given after TO.
  76.  
  77. L, LIST [Ln#, Ln#] - List the program.
  78.  
  79. FIND "String" [Ln#, Ln#] - Search for the specified string in the 
  80.      listing.
  81.  
  82. NEW  - Delete the program.
  83.  
  84. Commands for assembly and starting the program:
  85.  
  86. ASM [F] - Assembles the listing into a runnable program in memory.  
  87.      When you type F, the listing isn't shown during assembly.
  88.  
  89. PRGASM [F] - Assembles the listing into a program that can be 
  90.      saved with PRGSAVE.
  91.  
  92. LABEL [Adr/Label] - Shows all labels with their addresses.  If you 
  93.      enter a label or address, the others won't be shown.
  94.  
  95. GO Adr/Label - Lets you call up your program by entering the 
  96.      starting address or label.
  97.  
  98. TRACE Adr/Label - Use like GO.  Trace shows the register contents 
  99.      and flags after each machine language command.
  100.  
  101. Commands for storing and loading:
  102.  
  103. DIR [Filespec] - Show directory.  Wildcards are allowed, *.* is 
  104.      the default.
  105.  
  106. PATH [Drive:]Pathname - Change or specify the drive and pathname.
  107.  
  108. SAVE Filename - Saves the program specified.
  109.  
  110. LOAD Filename - Loads the program specified.
  111.  
  112. MERGE Filename - Append specified program to end of the one in 
  113.      memory.
  114.  
  115. BSAVE Adr, Length, Filename - Save part of the listing to 
  116.      Filename.
  117.  
  118. BLOAD ADR, Filename - Load a file into the program in memory at 
  119.      the address given.
  120.  
  121. PRGSAVE Filename - Must follow PRGASM.  Saves the assembled 
  122.      program as executable from the desktop.
  123.  
  124. Printer control:
  125.  
  126. PON  - Turns printer on: everything printed to screen is sent to 
  127.      the printer.
  128.  
  129. POFF - Turns printer off.
  130.  
  131. Other commands:
  132.  
  133. DUMP Adr/Label - Lists memory contents.
  134.  
  135. DIS Adr/Label - Disassembles memory from the specified address.
  136.  
  137. = / DECHEX Exp. - Shows the expression [calculations, labels...] 
  138.      in hexidecimal and decimal.
  139.  
  140. !Opcode - Allows testing of machine language commands. [eg. !CLR.B 
  141.      [A0]+ ]  The effects can be checked with REG.
  142.  
  143. REG  - All the register contents are saved after every call from 
  144.      GO, TRACE & !Opcode.  REG displays them.
  145.  
  146. PMREG - When the system "locks up", the last contents of the 
  147.      register are always saved and remain after a reset.  PMREG 
  148.      displays these values.
  149.  
  150. QUIT - Leave the assembler and return to the desktop.
  151.  
  152.  
  153.                        Assembler commands:
  154.  
  155.      As stated before, the  commands follow the general rules for 
  156. the most part.  A few of the peculiarities are:
  157.  
  158. 1.   The assembler demands clearly formulated commands.  A few 
  159. examples:  Try typing ADDA A0, A1 instead of ADD A0, A1; CMPI #5, 
  160. [A1] instead of CMP #5, [A1] etc.
  161.  
  162. 2.   The word lengths are, like normal, identified by the 
  163. extension ".B", ".W" or ".L" after the commands.  If only one 
  164. length is allowed or ".W" is desired you can forego any extension.  
  165. When addressing 'Address registers indirectly with Index and 
  166. Distance' you have to give the length. [eg. ...0[A0, D0.W] ]
  167.  
  168. 3.   Short Branch-commands jump between -128 and 126 should be 
  169. marked by a ".S" extension, otherwise they won't be recognized as 
  170. short commands.
  171.  
  172. 4.   The assembler doesn't accept the mneumonic "SP" [Stack 
  173. Pointer].  Use "A7" instead.
  174.  
  175. 5.   There are additionally the commands SAVEALL and LOADALL; 
  176. short for MOVEM.L D0-A6,-[A7] & MOVEM.L [A7]+,D0-A6.  Mnemonics 
  177. are likewise at your disposal for the LINE A-Command:  
  178. A_INIT  = $A000, A_PUPIX = $A001, A_GEPIX = $A002, A_LINE  = $A003,
  179. A_HOLIN = $A004, A_RECT  = $A005, A_POLY  = $A006, A_BTBLT = $A007,
  180. A_TXBLT = $A008, A_SHMOU = $A009, A_HICUR = $A00A, A_TRMOU = $A00B,
  181. A_UNSPR = $A00C, A_DRSPR = $A00D, A_COPRF = $A00E
  182.  
  183.                            Pseudo Ops:
  184.  
  185.      You can make use of more instructions in the listing along 
  186. with the assembler commands:
  187.  
  188. 1.   Comments must begin with a semicolon or asterisk.  It isn't 
  189. neccessary to seperate the asterisk from the commands.
  190.  
  191. 2.   The command DC [.DC is also allowed] defines a row of bytes, 
  192. words or longwords [dependent on .B, .W, .L].  Text must be 
  193. enclosed in either single or double quotation marks.  Those with 
  194. .W and .L get a null byte added to them in order to make the next 
  195. address even.  By using an exclaimation point, you can combine a 
  196. chain of bytes or words into a longword. [eg. DC.B 1,2,!LABEL,..]
  197.  
  198. 3.   You can reseve memory with DS [or .DS].  You can also use .B, 
  199. .W and .L here.
  200.  
  201. 4.   The command .EVEN assures that the next address worked on 
  202. will be even.
  203.  
  204. 5.   If you want to create an executable program [with PRGASM and 
  205. PRGSAVE], you have to decide between three sections: one for the 
  206. program, one for intialized data and one for uninitialized data.  
  207. This assembler demands that these blocks appear in the listing in 
  208. the named order.  In order to identify them write .DATA at the 
  209. beginning of the defined data and .BSS at the beginning of the 
  210. undefined.
  211.  
  212.                              Labels:
  213.  
  214.      You can use labels of course.  They must begin immediately at 
  215. the start of the line, in contrast to the assembler commands which 
  216. must be at least one space from the beginning of the line.  There 
  217. is no limit to the length of the labels, although only the first 
  218. 10 characters are significant.  Labels may not end with a colon.
  219.  
  220.                              Editing:
  221.  
  222.      When issuing direct commands or editing lines you should keep 
  223. the following in mind:
  224.  
  225.      The editing line is 72 characters long, if you exceed this 
  226. the cursor will move back to the beginning of the line.
  227.  
  228.      The arrow keys move the cursor to the left and right.  The 
  229. <Clr Home> key will erase the entire line.  To insert or delete 
  230. spaces, use the <Ins>, <Delete> and <Backspace> keys.  
  231.  
  232.      Press <Return> to end the input.  To ignore the changed 
  233. lines, press <Undo>. (With EDIT, INS and ADD you will 
  234. automatically return to the direct mode.)
  235.  
  236.      It should also be mentioned here that you may pause a listing 
  237. by pressing the space bar, and cancel it with the <Return> key.
  238.  
  239.                           Number system:
  240.  
  241.      Anywhere that you enter values (in the assembler listing or 
  242. in direct mode) you may choose from the following representations:
  243.  
  244. Decimal                     : (+/-)xxxx
  245. Hexadecimal                 : (+/-)$xxxx
  246. Binary                      : (+/-)%xxxx
  247. Label                       : LABEL
  248. Character                   : 'c
  249. String (up to 4 characters) : "cccc"
  250.  
  251. Otherwise you can connect several values together with the symbols 
  252. +, -, * and / (with the exception of characters and string 
  253. values).  These symbols don't follow the normal mathematical 
  254. rules, but instead the results are calculated from right to left! 
  255. (eg. instead of (b-c)*a, write a*b-c).
  256. (This is certainly an unusual and complicated style.  I decided 
  257. that since the usual operation only requires a simple addition or 
  258. subtraction (as a rule), I would save myself the trouble of 
  259. rewriting the program for this one oversight.)
  260.  
  261.                          Error Messages:
  262.  
  263.      Several errors can occur during assembly or direct input.  In 
  264. such a case there will be a bell sound and the error message will 
  265. appear, stopping the assembly.  There is no guarentee that the 
  266. assembler will catch every error, but in most cases this problem 
  267. won't arrise. [If you are uncertain, you can disassemble the 
  268. questionable section.]
  269.  
  270.      Here are the error messages and their meanings:
  271.  
  272. Illegal opcode      : Unknown command appeared during assembly.
  273. Undefined error     : Unable to identify error further.
  274. Wrong adressing mode: Present addressing mode con't be used here.
  275. Unknown adr. mode   : Addressing mode doesn't exist.
  276. Undefined label     : Label must be previously defined.
  277. Syntax              : Direct mode input error.
  278. File not found      : The file doesn't exist.
  279. Double def. label   : Label defined twice.
  280. Illegal reg #       : Wrong number entered for an address- or data 
  281.                      register. [0-7 are allowed]
  282. Adr. out of range   : Branch command to address not in it's range.  
  283.                      Can also occur when a Branch.S command tries 
  284.                      to jump directly to the next address.
  285. Value out of range  : Value won't fit into chosen word length.
  286. Abort               : User induced interuption.
  287. Illegal word size   : Missmatched word size for command.
  288. Printer not on line : Printer isn't plugged in or is off.
  289. Unknown word size   : Word size other than .B, .W or .L was used.
  290. No data register    : Data register required with this command.
  291. Disk:  -xx          : Diskerror #xx occured.
  292.  
  293. -----------------------------------------------------------------
  294.  
  295. Translater's adendum:
  296.  
  297.      This program, as I mentioned above, is Public Domain software 
  298. from West Germany.  I imported and translated it and consequently 
  299. cannot be held responsible for any damages or unforseen 
  300. consequences that may be encountered due to its use.
  301.  
  302.      This program in its original form including the German 
  303. documentation and my most recent translation may be ordered for 
  304. only $5.50 (to cover disk, translating, shipping and handling 
  305. costs).  Send your order to:
  306.  
  307.                          Robert Zimmerer
  308.                          131 W 2nd Street
  309.                      Port Angeles, WA  98362
  310.  
  311.      If you are interested in other programs from Germany, write 
  312. or call for more information.  My # is:
  313.  
  314.                           (206) 452-7529 
  315.